package cn.ryh.designpatterndemo.strategypattern;

import java.util.List;

/**
 * @ClassName Context
 * @Description 封装
 * @Author RaoYH
 * @Date 2019/4/26
 */
public class Context {
    private List<AbstractStrategy> list = null;

    public Context(List<AbstractStrategy> list) {
        this.list = list;
    }

    public void  useStrategyDoSomething(Integer index){
        this.list.get(index).doSomething();
    }
}
